package tetris.view;

import java.awt.Color;
import java.awt.Graphics;
import tetris.controller.BoardController;

/**
 * Describes a Tetris Board.
 *
 */
public class BoardView extends PanelView{
    private BoardController boardController;
    public BoardView(int gametype, BoardController cont){
        super();
        this.boardController = cont;
        this.setBackground(Color.GRAY);
        this.addKeyListener(this.boardController);
    }

    public void paint(Graphics g){
        this.requestFocus();
        super.paint(g);
        this.boardController.paintBoard(g);
    }
}
